package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.AgentUserForShopDBFallBack;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Map;

@FeignClient(name = "cs-shop-provider", configuration = CsConfiguration.class, fallback = AgentUserForShopDBFallBack.class)
public interface AgentUserForShopDB {
    @RequestMapping(value = "/getAgentShopByAgentId", method = RequestMethod.POST)
    Map<String,Object> getAgentShopByAgentId(@RequestParam("agent_id") String agent_id);
    @RequestMapping(value = "/insertAgentShop", method = RequestMethod.POST)
    int insertAgentShop(@RequestBody Map<String, Object> shopInfo);
    @RequestMapping(value = "/getNearShopById", method = RequestMethod.POST)
    Map<String,Object> getNearShopById(@RequestParam("id") String id);
    @RequestMapping(value = "/getProTypeById", method = RequestMethod.POST)
    Map<String,Object> getProTypeById(@RequestParam("id") String id);
}
